home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / tsqed16.zip / CRYPT.QMA < prev    next >
Text File  |  1992-03-28  |  2KB  |  50 lines

  1. *                                                All rights reserved
  2. * Encrypt or decrypt the current file
  3. * By Prof. Timo Salmi Sat 28-March-1992
  4. *
  5. * To compile these macros apply QMAC CRYPT.MAC CRYPT.QMA /A- /B
  6. *
  7. * To compile and use this command macro you need
  8. * (also version 2.1 will do):
  9. *  QMAC.EXE macro translator from /pc/editor/qmac215.zip
  10. *  CRYPTER.EXE from garbo.uwasa.fi:/pc/ts/tsfcom23.zip
  11. *
  12. * Before compiling the macro, edit the paths in the "Dos" command
  13. * lines to conform to where you have your files.
  14. *
  15. * To make this macro available you can e.g. first invoke the main menu
  16. * (usually F10) and select Macro: Read Macro: crypt.mac. Then you can
  17. * invoke the en/decryption with ALT-5.
  18. *
  19. * There is an annoying flaw in QEdit's CurrentFilename function. If
  20. * the path is long, the tails is truncated, and the macro won't work
  21. *
  22. * If you have your plain text file in r:\$crypt.txt then you can
  23. * encrypt and decrypt it back and forth simply by pressing ALT-5.
  24. * The macro works, though, even if you start from any text file.
  25. * The first time one gets it flip back and forth it almost looks
  26. * like some kind of a magic.
  27.  
  28. * ┌──────────────────────────────────┐
  29. * │ Encrypt or decrypt a file, ALT-5 │
  30. * └──────────────────────────────────┘
  31. @5 MacroBegin
  32. *
  33. * Encrypt of decrypt using my crypter program
  34. * Ensure that your password is at least 8 characters long and
  35. * non-trivial
  36.    Dos 'c:\tuki\crypter ' CurrentFilename ' r:\$crypt.tmp password'
  37.    Return Return
  38. *
  39. * Copy the results
  40.    Dos 'copy r:\$crypt.tmp r:\$crypt.txt'
  41.    Return Return
  42. *
  43. * Delete the intermediate file
  44.    Dos 'del r:\$crypt.tmp'
  45.    Return Return
  46. *
  47. * See the results
  48.    EditFile "r:\$crypt.txt" Return
  49.    EditFile CurrentFilename Return NewFile Return
  50.